<?php

namespace App\Http\Validate\OpenShop\SiteLocation;

use App\Http\Validate\BaseValidate;

/**
 * [ 提交选址 ] - 校验规则
 *
 * @SubmitFileValidate
 * @package App\Http\Controllers
 * @date 2022/04/26 02:35:56
 * @author huang
 */
class SubmitFileValidate extends BaseValidate
{


    static function registerValidateRules(): void
    {
        // TODO: Implement registerValidateRules() method.
    }

    static function getRules(array $fields = []): array
    {
        return [
            'heatMap'       => 'required|array',
            'leftPhoto'     => 'required|array',
            'rightPhoto'    => 'required|array',
            'frontPhoto'    => 'required|array',
            'innerPhoto'    => 'required|array',
            'shopVideo'     => 'required|array|min:1',
            'lineMarking'   => 'required|array',
            'infoPhoto'     => 'required|array',
            'infoPdf'       => 'required|array',
            'panoramaPhoto' => 'required|array',
        ];
    }


    public static array $attributes = [
        "heatMap"       => '百度热力图',
        'leftPhoto'     => '左视图',
        'rightPhoto'    => '右视图',
        'frontPhoto'    => '正视图',
        'innerPhoto'    => '店内图',
        'panoramaPhoto' => '远景图',
        'shopVideo'     => '视频',
        'lineMarking'   => '动线说明',
        'infoPhoto'     => '营业资料图片',
        'infoPdf'       => '营业资料pdf',
    ];

    public static function submitBaseValidate(array $requestParams): array
    {
        return self::baseValidate(
            $requestParams,
            array_keys(self::getRules()),
            null,
            null,
            self::getValidateMsg()
        );
    }

    public static function submitFileValidate(array $requestParams): array
    {
        return self::baseValidate(
            $requestParams,
            array_keys(self::getRules()),
            null,
            null,
            self::getValidateMsg()
        );
    }


}
